﻿using System;
using System.Collections.Generic;
using DL.Characters.Player.FSM.State;
using DL.Combat;
using DL.Combat.Base;
using DL.Input;
using DL.Movement;

namespace DL.Characters.Player.FSM.StateMachine
{
    public class PlayerCombatStateMachine : DL.FSM.StateMachine
    {

        private List<Type> _types = new List<Type>()
        {
            typeof(PlayerPreCombatState),
            typeof(PlayerNormalCombatState),
            typeof(PlayerCombatColdingState),
            typeof(PlayerCombatNullState),
        };

        public CharacterInputSystem InputSystem { get; private set; }
        public Player Player { get; private set; }
        public PlayerMoveController MovementController { get; private set; }
        public PlayerBaseAttackCombatController CombatController{ get; private set; }
        public PlayerBaseWeaponAttackCombatController WeaponCombotController{ get; private set; }

        public PlayerCombatStateMachine(Player player)
        {
            Player = player;
            MovementController = Player.MovementController;
            CombatController = Player.CombotController;
            WeaponCombotController = Player.WeaponCombotController;
            m_Animator = Player.Animator;
            
            InputSystem = CharacterInputSystem.Inst;
            Initialize(Player.transform, _types, nameof(PlayerCombatNullState));
        }
    }
}